<template>
	<view class="cc-tag-list-wrap">
		<view class="cc-tag-list" v-for="(item, index) in list" @click="handelClick(item)">{{item}}</view>
	</view>
</template>

<script>
	export default {
		name: "cc-tag-list",
		props: {
			list: {
				type: Array,
				default: () => [],
			}
		},
		data() {
			return {};
		},
		methods: {
			handelClick(item, index) {
				console.log(item)
				this.$emit('tagItemClick', item)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.cc-tag-list-wrap {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 20rpx;
	}

	.cc-tag-list {
		color: #aaa;
		background: #fff;
		border: 1rpx solid #aaa;
		padding: 10rpx 20rpx;	
		font-size: 30rpx;
	}
</style>